feat: typescript 6 update + eslint upgrade + flaky cypress test fix#158
feat: typescript 6 update + eslint upgrade + flaky cypress test fix#158Alessandro100 wants to merge 9 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
(custom) This PR updates the project’s TypeScript and linting toolchain to align with newer Next.js-era defaults: TypeScript 6.x, ESLint 9 (flat config), and a modern JS compilation target (ES2022), aiming to keep runtime behavior unchanged while modernizing developer tooling.
Changes:
- Upgraded TypeScript to 6.0.3 and updated TypeScript compiler settings (ES2022 target,
moduleResolution: bundler). - Migrated ESLint configuration to ESLint 9 flat config (
eslint.config.mjs), updated lint scripts, and removed legacy.eslintrc.json+ redundant ESLint packages. - Added a global
*.cssmodule declaration to allow side-effect CSS imports (e.g., MapLibre CSS).
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
yarn.lock |
Locks updated dependency graph for TypeScript 6 / ESLint 9 ecosystem upgrades. |
tsconfig.json |
Moves compile target to ES2022 and switches module resolution to bundler. |
src/global.d.ts |
Adds TypeScript declaration for importing .css files. |
src/app/Theme.ts |
Reorders/adjusts MUI module augmentations to remain compatible with updated tooling. |
package.json |
Updates devDependencies (TS 6, ESLint 9, typescript-eslint) and simplifies lint scripts. |
eslint.config.mjs |
Introduces ESLint 9 flat config with Next core-web-vitals + TypeScript ESLint integration. |
.eslintrc.json |
Removes legacy ESLint config in favor of flat config. |
|
*Lighthouse ran on https://mobilitydatabase-pdjq1bnn0-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-pdjq1bnn0-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-pdjq1bnn0-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-pdjq1bnn0-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-pdjq1bnn0-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
|
Summary:
closes #89 and #132
This PR upgrades the project to Typescript version 6. This version is the bridge for Typescript 7 which will be a massive performance upgrade due to it being ported to a GO compiler. In the process, this PR also updated the package.json to use eslint 9 and cleaned up unused / redundant packages. Some good rules to implement were turned off to be implemented in #153
Also updated the target of js compilation to ES2022 from es5
removed browserlist to rely on nextjs defaults
Expected behavior:
The application should behave exactly the same, and the linting should work as before. There are a few new warnings that come from the next eslint rules
Testing tips:
try
next build:prodyarn lintyarn start:devyarn start:prodall these commands should workPlease make sure these boxes are checked before submitting your pull request - thanks!
yarn testto make sure you didn't break anything